/*     */ package eos.moe.dragoncore;
/*     */ import java.io.IOException;
/*     */ import net.minecraft.client.gui.GuiButton;
/*     */ import net.minecraft.nbt.NBTTagCompound;
/*     */ import net.minecraft.util.math.BlockPos;
/*     */ import org.lwjgl.input.Keyboard;
/*     */ 
/*     */ public class ku extends GuiScreen {
/*     */   public final int d;
/*     */   public final int z;
/*     */   public final int i;
/*     */   private eos/moe/dragoncore/nt w;
/*     */   public String q;
/*     */   private cq g;
/*     */   
/*     */   public enum eos/moe/dragoncore/nt {
/*  17 */     i,
/*  18 */     w,
/*  19 */     q;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public ku(int i, NBTTagCompound nBTTagCompound) {
/*  28 */     this.w = eos/moe/dragoncore/nt.w;
/*  29 */     this.d = i;
/*  30 */     this.z = 0;
/*  31 */     this.i = 0;
/*  32 */     this.q = "NBTEdit -- EntityId #" + this.d;
/*  33 */     this.g = new cq(new nv(nBTTagCompound));
/*     */   }
/*     */   
/*     */   public ku(BlockPos blockPos, NBTTagCompound nBTTagCompound) {
/*  37 */     this.w = eos/moe/dragoncore/nt.q;
/*  38 */     this.d = blockPos.func_177958_n();
/*  39 */     this.z = blockPos.func_177956_o();
/*  40 */     this.i = blockPos.func_177952_p();
/*  41 */     this.q = "NBTEdit -- TileEntity at " + blockPos.func_177958_n() + "," + blockPos.func_177956_o() + "," + blockPos.func_177952_p();
/*  42 */     this.g = new cq(new nv(nBTTagCompound));
/*     */   }
/*     */   
/*     */   public ku(NBTTagCompound nBTTagCompound) {
/*  46 */     this.w = eos/moe/dragoncore/nt.i;
/*  47 */     this.d = 0;
/*  48 */     this.z = 0;
/*  49 */     this.i = 0;
/*  50 */     this.q = "NBTEdit -- 手中之物";
/*  51 */     this.g = new cq(new nv(nBTTagCompound));
/*     */   }
/*     */ 
/*     */   
/*     */   public void func_73866_w_() {
/*  56 */     Keyboard.enableRepeatEvents(true);
/*  57 */     this.field_146292_n.clear();
/*  58 */     this.g.initGUI(this.field_146294_l, this.field_146295_m, this.field_146295_m - 35);
/*  59 */     this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 4 - 100, this.field_146295_m - 27, "保存数据"));
/*  60 */     this.field_146292_n.add(new GuiButton(0, this.field_146294_l * 3 / 4 - 100, this.field_146295_m - 27, "退出"));
/*     */   }
/*     */   
/*     */   public void func_146281_b() {
/*  64 */     Keyboard.enableRepeatEvents(false);
/*     */   }
/*     */   
/*     */   public void func_73869_a(char c, int i) {
/*  68 */     gu gu = this.g.getWindow();
/*  69 */     if (gu != null) {
/*  70 */       gu.keyTyped(c, i);
/*     */     }
/*  72 */     else if (i == 1) {
/*  73 */       if (this.g.isEditingSlot())
/*  74 */       { this.g.stopEditingSlot(); }
/*     */       else
/*  76 */       { v(); } 
/*  77 */     } else if (i == 211) {
/*  78 */       this.g.deleteSelected();
/*  79 */     } else if (i == 28) {
/*  80 */       this.g.editSelected();
/*  81 */     } else if (i == 200) {
/*  82 */       this.g.arrowKeyPressed(true);
/*  83 */     } else if (i == 208) {
/*  84 */       this.g.arrowKeyPressed(false);
/*     */     } else {
/*  86 */       this.g.keyTyped(c, i);
/*     */     } 
/*     */   }
/*     */   
/*     */   public void func_73864_a(int i, int j, int k) throws IOException {
/*  91 */     if (this.g.getWindow() == null)
/*  92 */       super.func_73864_a(i, j, k); 
/*  93 */     if (k == 0)
/*  94 */       this.g.mouseClicked(i, j); 
/*  95 */     if (k == 1)
/*  96 */       this.g.rightClick(i, j); 
/*     */   }
/*     */   
/*     */   public void func_146274_d() throws IOException {
/* 100 */     super.func_146274_d();
/* 101 */     int i = Mouse.getEventDWheel();
/*     */     
/* 103 */     if (i != 0) {
/* 104 */       this.g.shift((i >= 1) ? 6 : -6);
/*     */     }
/*     */   }
/*     */ 
/*     */   
/*     */   public void func_146284_a(GuiButton guiButton) {
/* 110 */     if (guiButton.field_146124_l) {
/* 111 */       switch (guiButton.field_146127_k) {
/*     */         case 1:
/* 113 */           z();
/*     */           return;
/*     */       } 
/* 116 */       v();
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73876_c() {
/* 123 */     if (!this.field_146297_k.field_71439_g.func_70089_S()) {
/* 124 */       v();
/*     */     } else {
/* 126 */       this.g.updateScreen();
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73863_a(int i, int j, float f) {
/* 154 */     func_146276_q_();
/* 155 */     this.g.draw(i, j);
/* 156 */     func_73732_a(this.field_146297_k.field_71466_p, this.q, this.field_146294_l / 2, 5, 16777215);
/* 157 */     if (this.g.getWindow() == null) {
/* 158 */       super.func_73863_a(i, j, f);
/*     */     } else {
/* 160 */       super.func_73863_a(-1, -1, f);
/*     */     } 
/*     */   }
/*     */   public boolean func_73868_f() {
/* 164 */     return true;
/*     */   }
/*     */   
/*     */   public Entity getEntity() {
/* 168 */     return (this.w == eos/moe/dragoncore/nt.w) ? this.field_146297_k.field_71441_e.func_73045_a(this.d) : null;
/*     */   }
/*     */   
/*     */   public boolean isTileEntity() {
/* 172 */     return (this.w == eos/moe/dragoncore/nt.q);
/*     */   }
/*     */   
/*     */   public int getBlockX() {
/* 176 */     return (this.w == eos/moe/dragoncore/nt.w) ? 0 : this.d;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\ku.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */